<script src="lib/bootstrap-datepicker.js"></script>
<script src="lib/plupload-2.1.2/js/plupload.full.min.js"></script>

<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <strong>
                    <div ng-show="id">
                        编辑患者信息
                    </div>
                    <div ng-hide="id">
                        添加患者信息
                    </div>
                </strong>
            </div>

            <div class="panel-body">
                <form class="form-horizontal" role="form" ng-submit="submit()">
                    <div class="form-group" ng-show="error_msg">
                        <div class="col-sm-offset-1 col-sm-11">
                            <div class="alert alert-danger" role="alert">{{error_msg}}</div>
                        </div>
                    </div>

                    <input type="hidden" class="form-control" id="id" ng-model="id">
                    <div class="form-group" >
                        <div class="span6  col-sm-4">
                            <label for="username" class="col-sm-4 control-label">姓名</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="username" required="true" placeholder="姓名" ng-model="username">
                            </div>
                        </div>

                        <div class="span6  col-sm-4">
                            <label for="gender" class="col-sm-4 control-label">性别</label>
                            <div class="col-sm-4 ">

                                <select ng-model="gender" class="form-control" id = "gender" ng-options="item.code as item.desc for item in genders">
                                    <option value="">请选择性别</option>
                                </select>
                            </div>
                        </div>

                        <div class="span6 col-sm-4">
                            <label for="age" class="col-sm-4 control-label">年龄</label>
                            <div class="col-sm-4">
                                <input type="text" required="true" class="form-control" id="age" placeholder="年龄" ng-model="age">
                            </div>
                        </div>
                    </div>

                    <div class="form-group" >
                        <div class="span6  col-sm-4">
                            <label for="cardno" class="col-sm-4 control-label">身高</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="height" placeholder="身高" ng-model="height">
                            </div>
                        </div>

                        <div class="span6  col-sm-4">
                            <label for="phone" class="col-sm-4 control-label">体重</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="weight" placeholder="体重" ng-model="weight">
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="span6  col-sm-4">
                            <label for="cardno" class="col-sm-4 control-label">病历号</label>
                            <div class="col-sm-8">
                                <input type="text" required="true" class="form-control" id="cardno" placeholder="病历号" ng-model="cardno">
                            </div>
                        </div>

                        <div class="span6  col-sm-4">
                            <label for="phone" class="col-sm-4 control-label">联系患者</label>
                            <div class="col-sm-8">
                                <input type="text" required="true" class="form-control" id="phone" placeholder="联系方式" ng-model="phone">
                            </div>
                        </div>

                        <div class="span6  col-sm-4">
                            <label for="firstvistime" class="col-sm-4 control-label">首次诊断</label>
                            <div class="col-sm-8">
                                <div class="dropdown">
                                    <a class="dropdown-toggle" id="dropdown1" role="button" data-toggle="dropdown" data-target="#"
                                       href="">
                                        <div class="input-group">
                                            <input type="text"  required="true" id="firstvistime" class="form-control" ng-model="firstvistime">
                                            <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
                                        </div>
                                    </a>
                                    <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
                                        <datetimepicker ng-model="firstvistime"
                                                        data-datetimepicker-config="{ dropdownSelector: '#dropdown1',startView:'day', minView:'day'}"></datetimepicker>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="form-group" ng-hide="role == 4">
                        <div class="span6  col-sm-4">
                            <label for="province" class="col-sm-4 control-label">省份</label>
                            <div class="col-sm-8 ">
                                <select ng-model="province"
                                        ng-change="provinceChanged(province)"
                                        class="form-control" id="province"
                                        ng-options="item._id as item.name for item in provinces">
                                    <option value="">请选择省份</option>
                                </select>

                            </div>
                        </div>

                        <div class="span6  col-sm-4" ng-hide="role == 4">
                            <label for="hospital" class="col-sm-4 control-label">医院</label>
                            <div class="col-sm-8 ">
                                <select id="hospital"
                                        ng-change="hospitalChanged(hospital)"
                                        ng-model="hospital"
                                        class="form-control"
                                        ng-options="item._id as item.name for item in hospitals">
                                    <option value="">请选择医院</option>
                                </select>
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="span6  col-sm-4">
                            <label for="office" class="col-sm-4 control-label">科室</label>
                            <div class="col-sm-8 ">
                                <select id="office"
                                        ng-change="officeChanged(office)"
                                        ng-model="office"
                                        class="form-control"
                                        ng-options="item._id as item.name for item in offices">
                                    <option value="">请选择科室</option>
                                </select>
                            </div>
                        </div>

                        <div class="span6  col-sm-4">
                            <label for="doctor" class="col-sm-4 control-label">主治医生</label>
                            <div class="col-sm-8 ">
                                <select id="doctor"
                                        ng-model="doctor"
                                        class="form-control"
                                        ng-options="item._id as item.name for item in doctors">
                                    <option value="">请选择医生</option>
                                </select>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-sm-4 ">
                                <label for="disease" class="col-sm-4 control-label">疾病分类</label>
                                <div class="col-sm-8">
                                    <select id="disease"
                                            ng-model="disease"
                                            class="form-control"
                                            ng-options="item._id as item.name for item in diseases">
                                        <option value="">请选择疾病分类</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-8">
                            <label for="complaint" class="col-sm-2 col-sm-offset-0 control-label">主诉</label>

                            <div class="col-sm-10">
                            <textarea class="form-control" required="true"  class="form-control" id="complaint"
                                      ng-model="chief_complaint" rows="3"></textarea>
                            </div>
                        </div>
                    </div>

                    <div id="before_complaint_grp" class="form-group">
                        <div class="span1  col-sm-8">
                            <label for="before_complaint" class="col-sm-2 control-label">主诉附件</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control" id="before_complaint" placeholder="" ng-model="before_complaint_desc">
                            </div>
                            <div id="percentage_complaint" class="col-sm-1">
                            </div>
                            <div id="container_complaint" class="col-sm-3">
                                <a id="browser_complaint" href="javascript:;">[选择文件...]</a>
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-8">
                            <label for="diagnose" class="col-sm-2 col-sm-offset-0 control-label">诊断</label>

                            <div class="col-sm-10">
                            <textarea class="form-control"  class="form-control" id="diagnose"
                                      ng-model="diagnosis" rows="3"></textarea>
                            </div>
                        </div>
                    </div>

                    <div id="before_examine_grp" class="form-group">
                        <div class="span4  col-sm-8">
                            <label for="before_examine" class="col-sm-2 control-label">治疗前检验</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control" id="before_examine" placeholder="" ng-model="before_examine_desc">
                            </div>
                            <div id="percentage_examine" class="col-sm-1" />
                            <div id="container_examine" class="col-sm-3">
                                <a id="browser_examine" href="javascript:;">[选择文件...]</a>
                            </div>
                        </div>
                    </div>

                    <div id="before_check_grp" class="form-group">
                        <div class="span1  col-sm-8">
                            <label for="before_check" class="col-sm-2 control-label">治疗前检查</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control" id="before_check" placeholder="" ng-model="before_check_desc">
                            </div>

                            <div id="percentage_check" class="col-sm-1">
                            </div>

                            <div id="container_check" class="col-sm-3">
                                <a id="browser_check" href="javascript:;">[选择文件...]</a>
                            </div>
                        </div>
                    </div>

                    <div id="before_evaluation_grp" class="form-group">
                        <div class="span1  col-sm-8">
                            <label for="before_evaluation" class="col-sm-2 control-label">治疗前评估</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control" id="before_evaluation" placeholder="" ng-model="before_evaluation_desc">
                            </div>
                            <div id="percentage_evaluation" class="col-sm-1">
                            </div>
                            <div id="container_evaluation" class="col-sm-3">
                                <a id="browser_evaluation" href="javascript:;">[选择文件...]</a>
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-8">
                            <label for="operation_solution" class="col-sm-2 col-sm-offset-0 control-label">手术方案</label>

                            <div class="col-sm-10">
                            <textarea class="form-control"  class="form-control" id="operation_solution"
                                      ng-model="operation_solution" rows="3"></textarea>
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-8">
                            <label for="ABioC_solution" class="col-sm-2 col-sm-offset-0 control-label">ABioC方案</label>

                            <div class="col-sm-10">
                            <textarea class="form-control"  class="form-control" required="true" id="ABioC_solution"
                                      ng-model="abioc_solution" rows="3"></textarea>
                            </div>
                        </div>
                    </div>


                    <div class="form-group">
                        <div class="span6  col-sm-3">
                            <label for="wzblood" class="col-sm-6 control-label">外周血</label>
                            <div class="col-sm-6">
                                <input type="text"   class="form-control" id="wzblood" placeholder="" ng-model="wzblood">
                            </div>
                        </div>

                        <div class="span6  col-sm-3">
                            <label for="plt" class="col-sm-6 control-label">PLT浓度</label>
                            <div class="col-sm-6">
                                <input type="text"   class="form-control" id="plt" placeholder="" ng-model="plt">
                            </div>
                        </div>

                        <div class="span6  col-sm-3">
                            <label for="wz_volume" class="col-sm-6 control-label">使用体积</label>
                            <div class="col-sm-6">
                                <input type="number"  class="form-control" id="wz_volume" placeholder="" ng-model="wz_volume">
                            </div>
                        </div>

                        <div class="span6  col-sm-3">
                            <label for="treat_times" class="col-sm-6 control-label">治疗次数</label>
                            <div class="col-sm-6">
                                <input type="text"   class="form-control" id="treat_times" placeholder="" ng-model="treat_times">
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="span6  col-sm-3">
                            <label for="boneblood" class="col-sm-6 control-label">骨髓血</label>
                            <div class="col-sm-6">
                                <input type="text"   class="form-control" id="boneblood" placeholder="" ng-model="boneblood">
                            </div>
                        </div>

                        <div class="span6  col-sm-3">
                            <label for="plt" class="col-sm-6 control-label">细胞浓度</label>
                            <div class="col-sm-6">
                                <input type="text"   class="form-control" id="cell" placeholder="" ng-model="cell">
                            </div>
                        </div>

                        <div class="span6  col-sm-3">
                            <label for="cell_volume" class="col-sm-6 control-label">使用体积</label>
                            <div class="col-sm-6">
                                <input type="number"   class="form-control" id="cell_volume" placeholder="" ng-model="cell_volume">
                            </div>
                        </div>

                        <div class="span6  col-sm-3">
                            <label for="cell_treat_times" class="col-sm-6 control-label">治疗次数</label>
                            <div class="col-sm-6">
                                <input type="text"   class="form-control" id="cell_treat_times" placeholder="" ng-model="cell_treat_times">
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-8">
                            <label for="comment" class="col-sm-2 col-sm-offset-0 control-label">备注</label>

                            <div class="col-sm-10">
                            <textarea class="form-control"  class="form-control" id="comment"
                                      ng-model="comment" rows="3"></textarea>
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-8">
                            <label for="feedback" class="col-sm-2 col-sm-offset-0 control-label">反馈信息</label>

                            <div class="col-sm-10">
                            <textarea class="form-control"  class="form-control" id="feedback"
                                      ng-model="feedback" rows="3"></textarea>
                            </div>
                        </div>
                    </div>

                    <div class="form-actions">
                        <button type="submit" class="btn btn-default col-sm-offset-4 col-sm-1">确定</button>
                        <button type="button" class="btn col-sm-1 cancel_btn" ng-click="cancel()">取消</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>